<template>
  <div style="margin-top:39px">
    <div class="head1 jlayoutCenter">{{title}}</div>
    <bpm-c-toptitle :title="bpmcoreI18n.baseInfo"
                    :isCollapse="false">
      <ul>
        <li class="blockBasicLi">
          <div class="blockLeft">{{bpmcoreI18n.applyNumber}}</div>
          <div class="width832 blockRight">{{showBaseInfo.btNo}}</div>
          <div class="clear"></div>
        </li>
      </ul>
      <ul>
        <li class="blockBasicLi">
          <div class="blockLeft">{{bpmcoreI18n.applyDate}}</div>
          <div class="blockRight">{{showBaseInfo.createTime}}</div>
          <div class="blockLeft">{{bpmcoreI18n.applicant}}</div>
          <div class="blockRight">{{showBaseInfo.userName}}</div>
          <div class="clear"></div>
        </li>
      </ul>
      <ul>
        <li class="blockBasicLi">
          <div class="blockLeft">{{bpmcoreI18n.applyCompany}}</div>
          <div class="blockRight">{{showBaseInfo.deptName}}</div>
          <div class="blockLeft">{{bpmcoreI18n.applyPhone}}</div>
          <div class="blockRight">{{showBaseInfo.mobile}}</div>
          <div class="clear"></div>
        </li>
      </ul>
    </bpm-c-toptitle>
  </div>
</template>

<script>
import {mapState} from 'vuex'
export default {
  name: 'bpmDBasearea',
  data () {
    return {
    }
  },
  methods: {
  },
  props: {
    title: ''
  },
  computed: {
    ...mapState(['inst', 'bpmcoreI18n']),
    showBaseInfo: function () {
      let baseInfo = {}
      baseInfo.btNo = ''
      baseInfo.createTime = ''
      baseInfo.userName = ''
      baseInfo.deptName = ''
      baseInfo.btNo = this.inst.btNo
      baseInfo.createTime = this.toLocaleDate(this.inst.createTime)
      baseInfo.userName = this.inst.userName
      if (this.inst && this.inst.deptNameEn != null && typeof this.inst.deptNameEn !== 'undefined' && this.inst.deptNameEn !== '') {
        baseInfo.deptName = this.inst.deptName + '(' + this.inst.deptNameEn + ')'
      } else {
        baseInfo.deptName = this.inst.deptName
      }
      if (this.inst && this.inst.userInfo) {
        baseInfo.mobile = (!this.inst.userInfo.mobile ? '' : this.inst.userInfo.mobile) + (!this.inst.userInfo.officePhone ? '' : '/' + this.inst.userInfo.officePhone)
      }
      return baseInfo
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
  .head1 {
    background: url(/static/images/contentBg.png) repeat-x 0 -337px;
    color: #475d68;
    font-size: 14px;
    font-weight: bold;
    width: 980px;
    min-height: 26px;
    line-height: 26px;
  }
  div {
    font-size: 12px;
  }
  .blockBasicLi {
    line-height: 27px;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #e3e3e3;
    background-color: #eff3f6;
  }
  .blockLeft {
    background-color: #f4f4f4;
    float: left;
    text-align: center;
    width: 140px;
    min-height: 26px;
    border-left: 1px solid #e3e3e3;
    border-right: 1px solid #e3e3e3;
  }
  .width832 {
    width: 830px;
  }
  .blockRight {
    background-color: #eff3f6;
    float: left;
    padding-left: 8px;
    min-height: 26px;
    width: 340px;
    text-align: left;
  }
  ul, li {
    list-style: none outside none;
    padding: 0px;
    margin: 0px;
    min-height: 3px;
    border: 0;
  }
  li {
    display: list-item;
    text-align: -webkit-match-parent;
  }
  .clear {
    clear: both;
    padding: 0;
    margin: 0;
    line-height: 0;
    height: 0;
    overflow: hidden;
  }
  /* */
</style>
